<?php

namespace app\stores\model\cash;

use app\common\model\CommonModel;


class PrintSetModel extends CommonModel{

    protected  $name = 'beautiful_print_set';

    protected  $pk   = 'id';
    /**
     * 模型写入前事件（钩子函数）
     */
    public static function onBeforeInsert($model)
    {
        $model->set("add_time", date('Y-m-d H:i:s'));
        $model->set("edit_time", date('Y-m-d H:i:s'));
    }
    public static function up($data,$where){
        $data['edit_time']=date('Y-m-d H:i:s');
        $res=self::update($data,$where);
        return $res;
    }

}

